/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/include/ "dsi_panel_himax_vasta_hx8394c_tft_720p_video.dtsi"

&soc {
	serial@f991f000 {
		status = "ok";
	};

    uart5: uart@f9922000 {
		compatible = "qcom,msm-hsuart-v14";
		status = "ok";
		reg = <0xf9922000 0x1000>,
			   <0xf9904000 0x19000>;
		reg-names = "core_mem", "bam_mem";
		interrupt-names = "core_irq", "bam_irq", "wakeup_irq";
		#address-cells = <0>;
		interrupt-parent = <&uart5>;
		interrupts = <0 1 2>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0xffffffff>;
		interrupt-map = <0 &intc 0 112 0
					   1 &intc 0 238 0
					   2 &msmgpio 21 0>;
		qcom,tx-gpio = <&msmgpio 20 0x00>;
		qcom,rx-gpio = <&msmgpio 21 0x00>;
		qcom,cts-gpio = <&msmgpio 22 0x00>;
		qcom,rfr-gpio = <&msmgpio 23 0x00>;
		qcom,inject-rx-on-wakeup = <1>;
		qcom,rx-char-to-inject = <0xFD>;

		qcom,bam-tx-ep-pipe-index = <10>;		/*Consumer pipe*/
		qcom,bam-rx-ep-pipe-index = <11>;		/*Producer pipe*/
		qcom,msm-bus,name = "uart5";
		qcom,msm-bus,num-cases = <2>;
		qcom,msm-bus,num-paths = <1>;
		qcom,msm-bus,vectors-KBps = <86 512 0 0>,
								  <86 512 500 800>;
	};


	mdm0: qcom,mdm0 {
		compatible = "qcom,mdm2-modem";
		cell-index = <0>;
		#address-cells = <0>;
		interrupt-parent = <&mdm0>;
		interrupts = <0 1>;
		#interrupt-cells = <1>;
		interrupt-map-mask = <0xffffffff>;
		interrupt-map =
		<0 &msmgpio 49 0x3
		1 &msmgpio 27 0x3>;
		interrupt-names = "err_fatal_irq", "status_irq";

		qcom,mdm2ap-errfatal-gpio = <&msmgpio 49 0x00>;
		qcom,ap2mdm-errfatal-gpio = <&msmgpio 115 0x00>;
		qcom,mdm2ap-status-gpio = <&msmgpio 27 0x00>;
		qcom,ap2mdm-status-gpio = <&msmgpio 73 0x00>;
		qcom,ap2mdm-soft-reset-gpio = <&msmgpio 93 0x01>;
		qcom,ap2mdm-wakeup-gpio = <&msmgpio 94 0x00>;
		qcom,mdm2ap-wakeup-gpio = <&msmgpio 31 0x00>;
		qcom,ap2mdm-vddmin-gpio = <&msmgpio 98 0x00>;
		qcom,mdm2ap-vddmin-gpio = <&msmgpio 97 0x00>;
		qcom,ap2mdm-kpdpwr-gpio = <&pm8226_gpios 2 0>;
		qcom,ap2mdm-pmic-pwr-en-gpio = <&pm8226_gpios 3 0>;
		qcom,sybsys-name = "external_modem";

		qcom,ps-hold-delay-ms = <1000>;
		qcom,ramdump-delay-ms = <2000>;
		qcom,ramdump-timeout-ms = <120000>;
		qcom,vddmin-modes = "normal";
		qcom,vddmin-drive-strength = <8>;
		qcom,sysmon-subsys-id = <19>;
		qcom,no-reset-on-first-powerup = <1>;
		qcom,no-a2m-errfatal-on-ssr = <1>;
		status = "ok";
	};

	serial@f991f000 {
		status = "ok";
	};

	i2c@15{ /*SM5502 MUIC Chip node */
		/*Driver file: drivers/misc/sm5502.c*/
		/*CONFIG_SM5502_MUIC*/
                cell-index = <15>;
                compatible = "i2c-gpio";
                gpios = <&msmgpio 4 0  /*SDA*/
                        &msmgpio 5 0  /*SCL*/
                        >;
                i2c-gpio,delay-us = <2>;
                #address-cells = <1>;
                #size-cells = <0>;
                sm5502@25{
                        compatible = "sm5502,i2c";
                        reg = <0x25>;
                        interrupt-parent = <&msmgpio>;
                        interrupts= <52 0>;
                        sm5502,irq-gpio = <&msmgpio 52 0x00>;
                        sm5502,gpio-sda = <&msmgpio 4 0x00>;
                        sm5502,gpio-scl = <&msmgpio 5 0x00>;
                        sm5502,uarton-gpio = <&msmgpio 109 0x00>;
                };
                smb358@6A {
						compatible = "smb358,i2c";
						reg = <0x6A>;
				};
        };
	samsung,vibrator{
		compatible = "vibrator";
		samsung,motor-en = <&msmgpio 111 0x00>;
		status = "ok";
	};

	i2c@f9925000 { /* BLSP1 QUP2 */
		pn547@2B {
			compatible = "pn547";
			reg = <0x2B>;
			interrupt-parent = <&msmgpio>;
			interrupts = <66 0>;
			pn547,irq-gpio = <&msmgpio 66 0x00>;
			pn547,ven-gpio = <&msmgpio 24 0x1>;
			pn547,firm-gpio = <&msmgpio 62 0x00>;
		};
	};

	i2c@f9924000 { /* BLSP1 QUP2 */
		qcom,master-id = <0x56>;
		qcom,scl-gpio = <&msmgpio 7 0>;
		qcom,sda-gpio = <&msmgpio 6 0>;
		accelerometer@18 {
			compatible = "bma254";
			reg = <0x18>;
			interrupt-parent = <&msmgpio>;
			interrupts = <67 0>;
			bma254-i2c,i2c-pull-up = <1>;
			bma254-i2c,reg_vdd = "8226_l19";
			bma254,irq-gpio = <&msmgpio 67 0x1>;
			bma254-i2c,used_chip = "BMA25X_ENABLED";
			bma254,position = <5>;
		};
		taos@39 {
			compatible = "taos,tmd27723";
			reg = <0x39>;
			interrupt-parent = <&msmgpio>;
			interrupts = <65 0>;
			taos,irq_gpio = <&msmgpio 65 0>;
			taos,en = <&msmgpio 34 0>;
			taos,prox_cal_path = "/efs/prox_cal";
			taos,vdd_2p85 = "8226_l19";
			taos,prox_thresh_hi = <400>;
			taos,prox_thresh_low = <270>;
			taos,prox_th_hi_cal = <530>;
			taos,prox_th_low_cal = <400>;
			taos,als_time = <0xED>;
			taos,intr_filter = <0x33>;
			taos,prox_pulsecnt = <0x14>;
			taos,prox_gain = <0x28>;
			toas,coef_atime = <50>;
			taos,ga = <97>;
			taos,coef_a = <1000>;
			taos,coef_b = <1880>;
			taos,coef_c = <642>;
			taos,coef_d = <1140>;
		};
		k303c_acc@1d {
			compatible = "k303c_acc";
			reg = <0x1d>;
			interrupt-parent = <&msmgpio>;
			interrupts = <64 0>;
			k303c_acc,vdd-supply = <&pm8226_l19>;
			k303c_acc,vio-supply = <&pm8226_l6>;
			k303c_acc,gpio_int1 = <&msmgpio 64 0x00>;
			k303c_acc,fs_range = <0x00>;
			k303c_acc,axis_map_x = <1>;
			k303c_acc,axis_map_y = <0>;
			k303c_acc,axis_map_z = <2>;
			k303c_acc,negate_x = <1>;
			k303c_acc,negate_y = <1>;
			k303c_acc,negate_z = <0>;
			k303c_acc,poll_interval = <100>;
			k303c_acc,min_interval = <2>;
		};
		k303c_mag@1e {
			compatible = "k303c_mag";
			reg = <0x1e>;
			interrupt-parent = <&msmgpio>;
			k303c_mag,vdd-supply = <&pm8226_l19>;
			k303c_mag,vio-supply = <&pm8226_l6>;
			k303c_mag,poll_interval = <100>;
			k303c_mag,min_interval = <13>;
			k303c_mag,fs_range = <0x60>;
			k303c_mag,axis_map_x = <1>;
			k303c_mag,axis_map_y = <0>;
			k303c_mag,axis_map_z = <2>;
			k303c_mag,negate_x = <1>;
			k303c_mag,negate_y = <1>;
			k303c_mag,negate_z = <0>;
		};
		cm36686@60 {
			compatible = "cm36686";
			reg = <0x60>;
			interrupt-parent = <&msmgpio>;
			interrupts = <65 0>;
			cm36686,irq_gpio = <&msmgpio 65 0x1>;
			cm36686,leden_gpio = <&msmgpio 67 0x1>;
			cm36686,default_hi_thd = <11>;
			cm36686,default_low_thd = <7>;
			cm36686,cancel_hi_thd = <11>;
			cm36686,cancel_low_thd = <7>;
			reg_vdd-supply = <&pm8226_l19>;
			reg_vio-supply = <&pm8226_l6>;
			status = "okay";
		};
	};
	i2c@20 {
		status="disabled";
	};

	i2c@22 {
		cell-index = <22>;
		compatible = "i2c-gpio";
		gpios = <&msmgpio 117 0 /* sda */
			&msmgpio 118 0 /* scl */
		>;
		i2c-gpio,delay-us = <2>;
		#address-cells = <1>;
		#size-cells = <0>;

		svc_leds@30{
			compatible = "leds,ktd2026";
			reg = <0x30>;
		};
	};

	i2c@f9927000 { /* BLSP1 QUP5 */
                 bt532_ts_device@20 {
                        compatible = "zinitix,bt532_ts_device";
                        reg = <0x20>;
                        interrupt-parent = <&msmgpio>;
                        interrupts = <17 0>;
                        vddo-supply = <&pm8226_l6>;
                        zinitix,vdd_en-gpio = <&msmgpio 79 0x00>;
                        zinitix,irq-gpio = <&msmgpio 17 0x00>;
                        zinitix,vendor1 = <&msmgpio 91 0x00>;
                        zinitix,x_resolution = <720>;
                        zinitix,y_resolution = <1280>;
                        zinitix,page_size = <128>;
                        zinitix,orientation = <0>;
                        zinitix,tsp_vdd_supply_type = <0>;
                        keyled_gpio=<&msmgpio 119 0x00>;
                        zinitix,pname = "SM-G7508Q";
                };
	};

	gpio_keys {
		compatible = "gpio-keys";
		input-name = "gpio-keys";

		vddo-supply = <&pm8226_l6>;
		vddo-voltage = <1800>;

		home_key {
			label = "home_key";
			gpios = <&msmgpio 108 0x1>;
			linux,input-type = <1>;
			linux,code = <172>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};

		vol_up {
			label = "volume_up";
			gpios = <&msmgpio 106 0x1>;
			linux,input-type = <1>;
			linux,code = <115>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};
	};
	alps {
			compatible = "alps-input";
	};

	spi@f9923000 {
		ethernet-switch@3 {
			compatible = "micrel,ks8851";
			reg = <3>;
			interrupt-parent = <&msmgpio>;
			interrupts = <115 0x8>;
			spi-max-frequency = <4800000>;
			rst-gpio = <&msmgpio 114 0>;
			vdd-io-supply = <&pm8226_lvs1>;
			vdd-phy-supply = <&pm8226_lvs1>;
			status = "disable";
		};
	};

	sound {
		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"LDO_H", "MCLK",
			"SPK_OUT", "MCLK",
			"SPK_OUT", "EXT_VDD_SPKR",
			"AMIC1", "MIC BIAS1 External",
			"MIC BIAS1 External", "Handset Mic",
			"AMIC2", "MIC BIAS2 External",
			"MIC BIAS2 External", "Headset Mic",
			"AMIC3", "MIC BIAS1 External",
			"MIC BIAS1 External", "Sub Mic",
			"AMIC4", "MIC BIAS2 External",
			"MIC BIAS2 External", "ANCRight Headset Mic",
			"AMIC5", "MIC BIAS2 External",
			"MIC BIAS2 External", "ANCLeft Headset Mic";

		qcom,cdc-mclk-gpios = <&pm8226_gpios 1 0>;
		/*qcom,cdc-vdd-spkr-gpios = <&pm8226_gpios 2 0>;*/
	};

	sound-9302 {
		status = "disabled";
	};

	battery {
		status = "okay";
		compatible = "samsung,sec-battery";
		battery,vendor = "SDI SDI";
		battery,charger_name = "qpnp-chg";
		battery,fuelgauge_name = "bms";
		battery,technology = <2>; /* POWER_SUPPLY_TECHNOLOGY_LION */

		battery,chip_vendor = "QCOM";
		battery,temp_adc_type = <1>; /* SEC_BATTERY_ADC_TYPE_AP */

		battery,polling_time = <10 30 30 30 3600>;

		battery,adc_check_count = <5>;

		battery,cable_check_type = <4>; /* SEC_BATTERY_CABLE_CHECK_PSY */
		battery,cable_source_type = <3>; /* SEC_BATTERY_CABLE_SOURCE_EXTERNAL */
		battery,event_waiting_time = <600>;
		battery,polling_type = <1>; /* SEC_BATTERY_MONITOR_ALARM */
		battery,monitor_initial_count = <3>;

		battery,battery_check_type = <5>; /* SEC_BATTERY_CHECK_CHARGER */
		battery,check_count = <0>;
		battery,check_adc_max = <1440>;
		battery,check_adc_min = <0>;

		battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */

		battery,thermal_source = <2>; /* SEC_BATTERY_THERMAL_SOURCE_ADC */
		battery,temp_check_type = <2>; /* SEC_BATTERY_TEMP_CHECK_TEMP */
		battery,temp_check_count = <1>;
		battery,full_check_type = <2>; /* SEC_BATTERY_FULLCHARGED_FG_CURRENT */
		battery,full_check_type_2nd = <3>; /* SEC_BATTERY_FULLCHARGED_TIME */
		battery,full_check_count = <1>;
		battery,chg_gpio_full_check = <0>;
		battery,chg_polarity_full_check = <1>;

		/* SEC_BATTERY_FULL_CONDITION_SOC |
		   SEC_BATTERY_FULL_CONDITION_NOTIMEFULL |
		   SEC_BATTERY_FULL_CONDITION_VCELL */
		battery,full_condition_type = <13>;
		battery,full_condition_soc = <97>;
		battery,full_condition_vcell = <4250>;

		battery,recharge_check_count = <1>;
		battery,recharge_condition_type = <4>; /* SEC_BATTERY_RECHARGE_CONDITION_VCELL */
		battery,recharge_condition_soc = <98>;
		battery,recharge_condition_vcell = <4300>;

		battery,charging_total_time = <21600>;
		battery,recharging_total_time = <5400>;
		battery,charging_reset_time = <0>;

		charger{
			status = "disable";
			/* Charger */
			battery,charger_name = "qpnp-chg";
			battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */
			battery,full_check_type = <2>; /* SEC_BATTERY_FULLCHARGED_FG_CURRENT */

			battery,input_current_limit = <700 500 500 700 500 700 700 500 500 700 650 700 700 500 500 300 700 700 300 700 700 500 500>;
			battery,fast_charging_current = <700 0 500 700 500 700 700 500 0 700 750 700 700 (-1) 500 300 700 700 300 700 700 0 0>;
			battery,full_check_current_1st = <200 0 200 200 200 200 200 200 0 200 200 200 200 0 200 200 200 200 200 200 200 0 0>;
			battery,full_check_current_2nd = <2400 0 2400 2400 2400 2400 2400 2400 0 2400 2400 2400 2400 0 2400 2400 2400 2400 2400 2400 2400 0 0>;
		};
	};
};

&usb_otg {
	#address-cells = <0>;
	interrupt-parent = <&usb_otg>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 134 0
			1 &intc 0 140 0
			2 &spmi_bus 0x0 0x0 0x9 0x0>;
	interrupt-names = "core_irq", "async_irq", "pmic_id_irq";

	qcom,hsusb-otg-mode = <3>;
	vbus_otg-supply = <&pm8226_chg_otg>;
	qcom,hsusb-otg-phy-init-seq =
			<0x44 0x80 0x5A 0x81 0x24 0x82 0x13 0x83 0xffffffff>;
};

&sdcc1 {
	vdd-supply = <&pm8226_l17>;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <800 500000>;

	vdd-io-supply = <&pm8226_l6>;
	qcom,vdd-io-always-on;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <250 154000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;
	qcom,sup-voltages = <2950 2950>;

	qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
	qcom,nonremovable;

	status = "disabled";
};

&sdhc_1 {
	vdd-supply = <&pm8226_l17>;
	qcom,vdd-always-on;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <800 500000>;

	vdd-io-supply = <&pm8226_l6>;
	qcom,vdd-io-always-on;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <250 154000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;
	qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
	qcom,nonremovable;

	status = "ok";
};

&sdcc2 {
	vdd-supply = <&pm8226_l18>;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <9000 800000>;

	vdd-io-supply = <&pm8226_l21>;
	qcom,vdd-io-voltage-level = <1800000 2950000>;
	qcom,vdd-io-current-level = <6 22000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;
	qcom,sup-voltages = <2950 2950>;

	qcom,xpc;
	qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
	qcom,current-limit = <600>; #address-cells = <0>; interrupt-parent = <&sdcc2>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 125 0
			1 &intc 0 220 0
			2 &msmgpio 38 0x3>;
	interrupt-names = "core_irq", "bam_irq", "status_irq";
	cd-gpios = <&msmgpio 110 0x1>;

	status = "disabled";
};

&sdhc_2 {
	vdd-supply = <&pm8226_l18>;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <9000 800000>;

	vdd-io-supply = <&pm8226_l21>;
	qcom,vdd-io-voltage-level = <1800000 2950000>;
	qcom,vdd-io-current-level = <6 22000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;

	#address-cells = <0>;
	interrupt-parent = <&sdhc_2>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 125 0
			1 &intc 0 221 0
			2 &msmgpio 38 0x3>;
	interrupt-names = "hc_irq", "pwr_irq", "status_irq";
	cd-gpios = <&msmgpio 110 0x1>;

	status = "ok";
};

&spmi_bus {
	qcom,pm8226@0 {
		qcom,leds@a100 {
			status = "disabled";
			qcom,led_mpp_2 {
				label = "mpp";
				linux,name = "button-backlight";
				linux,default-trigger = "none";
				qcom,default-state = "off";
				qcom,max-current = <40>;
				qcom,current-setting = <5>;
				qcom,id = <6>;
				qcom,mode = "manual";
				qcom,source-sel = <1>;
				qcom,mode-ctrl = <0x60>;
			};
		};

		qcom,leds@a300 {
			status = "disabled";
			qcom,led_mpp_4 {
				label = "mpp";
				linux,name = "green";
				linux,default-trigger = "battery-full";
				qcom,default-state = "off";
				qcom,max-current = <40>;
				qcom,current-setting = <5>;
				qcom,id = <6>;
				qcom,mode = "pwm";
				qcom,pwm-us = <1000>;
				qcom,source-sel = <8>;
				qcom,mode-ctrl = <0x60>;
				qcom,pwm-channel = <0>;
				qcom,start-idx = <1>;
				qcom,ramp-step-ms = <120>;
				qcom,duty-pcts = [00 00 00 00 00
						  00 00 00 00 00
						  50 00 00 00 00
						  00 00 00 00 00
						  00];
				qcom,use-blink;
			};
		};

		qcom,leds@a500 {
			status = "disabled";
			qcom,led_mpp_6 {
				label = "mpp";
				linux,name = "red";
				linux,default-trigger = "battery-charging";
				qcom,default-state = "off";
				qcom,max-current = <40>;
				qcom,current-setting = <5>;
				qcom,id = <6>;
				qcom,mode = "pwm";
				qcom,pwm-us = <1000>;
				qcom,mode-ctrl = <0x60>;
				qcom,source-sel = <10>;
				qcom,pwm-channel = <5>;
				qcom,start-idx = <1>;
				qcom,ramp-step-ms = <120>;
				qcom,duty-pcts = [00 00 00 00 00
						  00 00 00 00 00
						  50 00 00 00 00
						  00 00 00 00 00
						  00];
				qcom,use-blink;
			};
		};

		/* For Hard reset */
		qcom,power-on@800 {
			compatible = "qcom,qpnp-power-on";
			reg = <0x800 0x100>;
			interrupts = <0x0 0x8 0x0>,
				<0x0 0x8 0x1>,
				<0x0 0x8 0x4>,
				<0x0 0x8 0x5>;
			interrupt-names = "kpdpwr", "resin",
				"resin-bark", "kpdpwr-resin-bark";
			qcom,s3-debounce = <128>;

			qcom,pon_1 {
				qcom,pon-type = <0>;
				qcom,disable-reset = <1>;
				qcom,pull-up = <1>;
				linux,code = <116>;
			};

			qcom,pon_2 {
				qcom,pon-type = <1>;
				qcom,pull-up = <1>;
				linux,code = <114>;
				qcom,s1-timer = <6720>;
				qcom,s2-timer = <1000>;
				qcom,s2-type = <1>;
				qcom,support-reset = <0>;
				qcom,disable-reset = <1>;
			};

			qcom,pon_3 {
				qcom,pon-type = <3>;
				qcom,support-reset = <1>;
				qcom,s1-timer = <6720>;
				qcom,s2-timer = <1000>;
				qcom,s2-type = <1>;
				qcom,pull-up = <1>;
			};
		};
	};

	qcom,pm8226@1 {
                qcom,leds@d300 {
                        status = "okay";
                };

		qcom,leds@d800 {
			status = "disabled"; /*If WLED is not used for Backlight control*/
			qcom,wled_0 {		/*for TFT Panel, this to be disabled */
				label = "wled";
				linux,name = "wled:backlight";
				linux,default-trigger = "bkl-trigger";
				qcom,cs-out-en;
				qcom,op-fdbck = <1>;
				qcom,default-state = "off";
				qcom,max-current = <20>;
				qcom,ctrl-delay-us = <0>;
				qcom,boost-curr-lim = <3>;
				qcom,cp-sel = <0>;
				qcom,switch-freq = <11>;
				qcom,ovp-val = <0>;
				qcom,num-strings = <1>;
				qcom,id = <0>;
			};
		};
	};
};

&pm8226_gpios {
	gpio@c000 { /* GPIO 1 */
		/* XO_PMIC_CDC_MCLK enable for tapan codec */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;	/* CMOS logic */
		qcom,pull = <5>;		/* QPNP_PIN_PULL_NO*/
		qcom,vin-sel = <3>;		/* QPNP_PIN_VIN3 */
		qcom,out-strength = <3>;/* QPNP_PIN_OUT_STRENGTH_HIGH */
		qcom,src-sel = <2>;		/* QPNP_PIN_SEL_FUNC_1 */
		qcom,master-en = <1>;	/* Enable GPIO */
	};

	gpio@c100 { /* GPIO 2 */
		qcom,mode = <1>;
		qcom,output-type = <0>;
		qcom,pull = <5>;
		qcom,vin-sel = <3>;
		qcom,out-strength = <3>;
		qcom,src-sel = <0>;
		qcom,master-en = <1>;
	};

	gpio@c200 { /* GPIO 3 */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;	/* CMOS logic */
		qcom,pull = <5>;		/* QPNP_PIN_PULL_NO*/
		qcom,vin-sel = <3>;		/* QPNP_PIN_VIN3 */
		qcom,out-strength = <3>;/* QPNP_PIN_OUT_STRENGTH_HIGH */
		qcom,src-sel = <0>;		/* QPNP_PIN_SEL_FUNC_1 */
		qcom,master-en = <1>;	/* Enable GPIO */
	};

	gpio@c300 { /* GPIO 4 */
	};

	gpio@c400 { /* GPIO 5 */
		qcom,mode = <1>;                /* Digital output */
		qcom,output-type = <0>; /* CMOS logic */
		qcom,pull = <5>;                /* QPNP_PIN_PULL_NO */
		qcom,vin-sel = <3>;             /* QPNP_PIN_VIN2 */
		qcom,out-strength = <3>;/* QPNP_PIN_OUT_STRENGTH_HIGH */
		qcom,src-sel = <2>;             /* QPNP_PIN_SEL_FUNC_1 */
		qcom,master-en = <1>;
	};

	gpio@c500 { /* GPIO 6 */
	};

	gpio@c600 { /* GPIO 7 */
	};

	gpio@c700 { /* GPIO 8 */
		qcom,master-en = <0>;
	};
};

&pm8226_mpps {
	mpp@a000 { /* MPP 1 */
	};

	mpp@a100 { /* MPP 2 */
	};

	mpp@a200 { /* MPP 3 */
	};

	mpp@a300 { /* MPP 4 */
	};

	mpp@a400 { /* MPP 5 */
		/* PA_THERM0 config */
		qcom,mode = <4>; /* AIN input */
		qcom,invert = <1>; /* Enable MPP */
		qcom,ain-route = <0>; /* AMUX 5 */
		qcom,master-en = <1>;
		qcom,src-sel = <0>; /* Function constant */
	};

	mpp@a500 { /* MPP 6 */
		qcom,mode = <4>; /* AIN input */
		qcom,invert = <1>; /* Enable MPP */
		qcom,ain-route = <1>; /* AMUX 6 */
		qcom,master-en = <1>;
		qcom,src-sel = <0>; /* Function constant */
	};

	mpp@a600 { /* MPP 7 */
	};

	mpp@a700 { /* MPP 8 */
		/* PA_THERM1 config */
		qcom,mode = <4>; /* AIN input */
		qcom,invert = <1>; /* Enable MPP */
		qcom,ain-route = <3>; /* AMUX 8 */
		qcom,master-en = <1>;
		qcom,src-sel = <0>; /* Function constant */
	};
};

&pm8226_vadc {
	chan@14 {
		label = "pa_therm0";
		reg = <0x14>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};

	chan@15 {
		label = "mpp6_div1";
		reg = <0x15>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <1>;
		qcom,calibration-type = "absolute";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0>;
		qcom,fast-avg-setup = <0>;
	};

	chan@17 {
		label = "pa_therm1";
		reg = <0x17>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};

	chan@27 {
		label = "mpp8_div3";
		reg = <0x27>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <1>;
		qcom,calibration-type = "absolute";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0>;
		qcom,fast-avg-setup = <0>;
		};
};

/ {
	mtp_batterydata: qcom,battery-data {
		qcom,rpull-up-kohm = <100>;
		qcom,vref-batt-therm = <1800000>;

		/include/ "batterydata-palladium.dtsi"
		/include/ "batterydata-mtp-3000mah.dtsi"
	};
};


&pm8226_bms {
	status = "ok";
	qcom,r-sense-uohm = <10200>;
	qcom,enable-fcc-learning;
	qcom,min-fcc-learning-soc = <20>;
	qcom,min-fcc-ocv-pc = <30>;
	qcom,min-fcc-learning-samples = <5>;
	qcom,fcc-resolution = <10>;
	qcom,battery-data = <&mtp_batterydata>;
};

&pm8226_chg {
	status = "ok";
	qcom,battery-data = <&mtp_batterydata>;
};

&slim_msm {
	tapan_codec {
		qcom,cdc-micbias1-ext-cap;
		qcom,cdc-micbias-cfilt1-mv = <1800>;
		qcom,cdc-micbias-cfilt2-mv = <2800>;
		qcom,cdc-micbias-cfilt3-mv = <1800>;
	};
};

&mdss_mdp {
	qcom,mdss-pref-prim-intf = "dsi";
};

&mdss_dsi0 {
	qcom,dsi-pref-prim-pan = <&dsi_himax_vasta_tft_720p_video>;
};

